package cn.quevo.cube.provide.define.validate.impl;


import cn.quevo.cube.provide.define.entity.dto.CubeColumnDto;
import cn.quevo.cube.provide.define.validate.AbstractColumnTypeValidate;
import cn.quevo.cube.provide.define.validate.ColumnTypeValidate;
import cn.quevo.cube.provide.define.validate.tools.NumberTool;

/**
 * 文本验证
 *
 * @author July july_sky@foxmail.com
 * @version 1.0
 * @date 2018/12/14 5:41 PM
 * @Copyright 湘豫（北京）科技有限公司版权所有.All Rights Reserved.
 */
public class TextValidate extends AbstractColumnTypeValidate implements ColumnTypeValidate {
    @Override
    protected void checked(CubeColumnDto cubeColumnDto) {
        NumberTool.checkNumber(cubeColumnDto.getMinLength(), cubeColumnDto.getMaxLength());
        cubeColumnDto.setDecimalNum(null);
        cubeColumnDto.setMinValue(null);
        cubeColumnDto.setMaxValue(null);
    }
}
